from src.utils.loggers import test_logger
from nicegui import ui
from src.app import APP
import secrets
from src.views.home import LayoutTemplate


def main():
    print("Hello from coordinate-nicegui-v2!")


if __name__ == "__main__":
    # main()
    # test_logger()
    pass

if 1:
    app = APP()
    app.set_NiceGUIApp()

    @ui.page('/')
    def home():
        """主页路由"""
        main_window = LayoutTemplate()
        main_window.set_APP(app)
        main_window.build()
        # app_init_logger.info("通用页面布局已加载！")
        # with ui.button('点击我'):
        # 弹出消息
        # pass

    ui.run(title='坐标分析系统', storage_secret=secrets.token_urlsafe(16))
